#include "DTDParserDriver.h"
#include "DTDParser.hh"

DTDParserDriver::DTDParserDriver()
{
}

DTDParserDriver::~DTDParserDriver()
{}

int DTDParserDriver::parse(const std::string& f)
{
  file = f;
  scan_begin();
  zz::DTDParser parser(*this);
  int res = parser.parse();
  scan_end();
  return res;
}

void DTDParserDriver::error (const zz::location& l, const std::string& m)
{
  std::cerr << l << ": " << m << std::endl;
}

void DTDParserDriver::error (const std::string& m)
{
  std::cerr << m << std::endl;
}
